home *** CD-ROM | disk | FTP | other *** search
- Path: cpsc.ucalgary.ca!davidt
- From: davidt@cpsc.ucalgary.ca (David Taylor)
- Newsgroups: comp.lang.c++
- Subject: Re: cout escape sequences
- Date: 26 Mar 1996 22:26:09 GMT
- Organization: University of Calgary CPSC
- Message-ID: <4j9qu1$rvg@linux.cpsc.ucalgary.ca>
- References: <3152EDB3.32AE@legendcomm.com>
- NNTP-Posting-Host: fsj.cpsc.ucalgary.ca
-
- In article <3152EDB3.32AE@legendcomm.com>,
- Karl Strauss <karl@legendcomm.com> wrote:
- >I was wondering if there were more escape sequences to use with
- >cout. I know of \n,\t.
- >
- >Are there some others? Specifically for making text bold or
- >making it reverse text?
- >
-
- Yes, there are some others. \r is a carriage return and \a is the
- bell. \xxx where xxx is an octal number will output the ascii
- character cooresponding to that number. A good C or C++ reference
- manual will list them all.
-
- Bold and reverse cannot be done in a platform independent manner with
- cout. If you are on a Unix machine, tgetent(3) and tgetstr(3) will
- allow you to do this; see "man termcap" for more details.
-
- --
- Andrew Taylor |email: davidt@cpsc.ucalgary.ca
- |www: http://www.cpsc.ucalgary.ca/~davidt
-